package cn.tedu.d17_thread;
/*
 测试线程的创建，继承Thread方法
 */
public class Test1_Thread {
    public static void main(String[] args) {
        MyThread t=new MyThread("孙悟空");
        MyThread t1=new MyThread("唐僧");
        MyThread t3=new MyThread("玉皇大帝");
        t.start();
        t1.start();
        t3.start();

    }


}


class MyThread extends Thread{

    public MyThread(){
        super();
    }
    public MyThread(String name){
        super(name);
    }

    @Override
    public void run(){
        for (int i = 0; i <100; i++) {
            System.out.println(i+" "+getName());
        }

    }



}
